package liangtWorkSpace;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName AppleMain
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/14 19:21
 */
public class AppleMain {

    public static void main(String[] args) {
        List<Apple> appleList = new ArrayList<>();
        appleList.add(new Apple(156,"Yello"));
        appleList.add(new Apple(148,"green"));
        appleList.add(new Apple(179,"green"));

        System.out.println(AppleTest.filterApple(appleList,AppleTest::isGreenApple));
        System.out.println(AppleTest.filterApple(appleList,(Apple a)->"green".equals(a.getColor())));
        System.out.println(AppleTest.filterApple(appleList,AppleTest::isWeightApple));
        System.out.println(AppleTest.filterApple(appleList,(Apple a)->a.getWeight() > 150));
    }
}
